import { Module } from '@nestjs/common'
import { PropositionService } from './proposition.service'
import { PropositionController } from './proposition.controller'
import { Proposition, PropositionSchema } from '../model/proposition.schema'
import { Comment, commentSchema } from '../model/comment.schema'
import { Collect, collectSchema } from '../model/collect.schema'
import { Like, likeSchema } from '../model/like.Schema'
import { MongooseModule } from '@nestjs/mongoose'
import { Bar, BarSchema } from '../model/bar.schema'
// import { BarModule } from '../bar/bar.module'
@Module({
  imports: [
    MongooseModule.forFeature([
      { name: Proposition.name, schema: PropositionSchema },
      { name: Comment.name, schema: commentSchema },
      { name: Collect.name, schema: collectSchema },
      { name: Like.name, schema: likeSchema },
      { name: Bar.name, schema: BarSchema },
    ]),
  ],
  controllers: [PropositionController],
  providers: [PropositionService],
  exports: [
    MongooseModule.forFeature([
      { name: Proposition.name, schema: PropositionSchema },
      { name: Comment.name, schema: commentSchema },
      { name: Collect.name, schema: collectSchema },
      { name: Like.name, schema: likeSchema },
      { name: Bar.name, schema: BarSchema },
    ]),
  ],
})
export class PropositionModule {}
